package com.patterns.singleton;

/**
 * @Author Tanyu
 * @Date 2020/6/2 9:44
 * @Description 懒汉式加载（线程不安全）
 * @Version 1.0
 */
public class SingletonLazy {

  private static SingletonLazy singleton;
  private SingletonLazy(){}

  public static SingletonLazy getInstance(){
    if (singleton==null){
      singleton=new SingletonLazy();
    }
    return singleton;
  }

}
